package pl.edu.agh.anomalyids.network.header.impl;

import pl.edu.agh.anomalyids.network.header.Header;

public class UDPHeader implements Header {

	private static final long serialVersionUID = 1L;
	
	private int srcPort;
	private int destPort;
	
	public int getSrcPort() {
		return srcPort;
	}

	public void setSrcPort(int srcPort) {
		this.srcPort = srcPort;
	}

	public int getDestPort() {
		return destPort;
	}

	public void setDestPort(int destPort) {
		this.destPort = destPort;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		
		builder.append("======= UDP ======\n");
		builder.append("Source port: ");
		builder.append(getSrcPort());
		builder.append("\n");
		builder.append("Destination port: ");
		builder.append(getDestPort());
		builder.append("\n");
		
		return builder.toString();
	}
	
	@Override
	public String getName() {
		return "UDP";
	}
}
